package com.yuan.contract.controller;

import cn.common.result.Response;
import cn.model.ContractOrder;
import com.yuan.contract.service.ContractOrderService;
import com.yuan.security.annotation.RequiresLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/contract")
public class ContractOrderController {
    @Autowired
    private ContractOrderService contractOrderService;
    @PostMapping("/setContractOrder")
    @RequiresLogin
    public Response setContractOrder(@RequestBody ContractOrder contractOrder) {
         return Response.Success(contractOrderService.setContractOrder(contractOrder));
    }
}
